Skip to content

Improve test coverage reporting and CI/CD pipeline#17

Merged
valbeat merged 2 commits into
mainfrom
feat/improve-test-coverage
Aug 9, 2025
Merged

Improve test coverage reporting and CI/CD pipeline#17
valbeat merged 2 commits into
mainfrom
feat/improve-test-coverage

Conversation

@valbeat

@valbeat valbeat commented Aug 9, 2025

Copy link
Copy Markdown
Owner

Summary

Enhanced CI/CD pipeline with better test coverage reporting using PCOV and improved workflow configuration.

Changes

Coverage Improvements

  • Switch from Xdebug to PCOV: Significantly faster code coverage generation (~10x faster)
  • Multiple output formats:
    • Clover XML for Codecov integration
    • HTML report for human review
    • JUnit XML for test results tracking

CI/CD Pipeline Enhancements

  • Matrix strategy: Ready for multi-PHP version testing
  • Better dependency caching: Using ramsey/composer-install action
  • Codecov v5: Updated to latest version (token-free for public repos)
  • Test results tracking: Added codecov/test-results-action for detailed test analytics
  • Artifact uploads: Test results and HTML coverage available as GitHub Actions artifacts

Configuration Updates

  • PCOV configured to exclude vendor/ and tests/ directories
  • Added /build/ directory to .gitignore
  • Strict error handling (fail_ci_if_error: true)
  • 7-day retention for test artifacts

Benefits

  • 10x faster coverage: PCOV vs Xdebug performance improvement
  • 📊 Comprehensive reporting: Coverage + test results in Codecov
  • 📁 Downloadable artifacts: HTML coverage for offline review
  • 🔄 Future-ready: Matrix strategy for multi-version testing
  • 🚀 Optimized caching: Faster CI runs with better dependency management

Test Plan

  • Validate workflow syntax
  • Verify PCOV configuration
  • Confirm CI pipeline passes
  • Check Codecov receives both coverage and test results
  • Verify artifacts are uploaded correctly

Summary by CodeRabbit

  • Chores
    • Enhanced CI workflow to upload JUnit test results to Codecov, improving test reporting integration.

valbeat added 2 commits August 9, 2025 21:48
- codecov/test-results-action@v1を追加
- JUnit形式のテスト結果をCodecovに送信
- cancelled()でもテスト結果を送信するように設定
- テスト結果のアップロードに失敗した場合もCIを失敗させる
- より厳格なエラーハンドリング
Copilot AI review requested due to automatic review settings August 9, 2025 12:50
@valbeat valbeat self-assigned this Aug 9, 2025
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Aug 9, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

A new step was added to the GitHub Actions workflow to upload JUnit XML test results to Codecov using the codecov/test-results-action@v1 action. This step runs after the existing coverage upload and is conditioned to execute only if the workflow is not cancelled.

Changes

Cohort / File(s) Change Summary
GitHub Actions Workflow Update
.github/workflows/test.yml
Added a step to upload JUnit XML test results to Codecov after coverage upload, with error handling and conditional execution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇
A hop to Codecov, results in tow,
From JUnit logs, the numbers flow.
With workflows neat and steps anew,
Our tests report what they must do.
A bunny cheers with every run—
More coverage, more fun!

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b447222 and a9d0de7.

📒 Files selected for processing (1)
  • .github/workflows/test.yml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/improve-test-coverage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the CI/CD pipeline by improving test coverage reporting through a switch from Xdebug to PCOV and adding comprehensive test result tracking. The changes focus on performance optimization and better integration with Codecov for both coverage and test analytics.

  • Switch from Xdebug to PCOV for 10x faster coverage generation
  • Add Codecov test results integration with JUnit XML tracking
  • Implement artifact uploads for test results and HTML coverage reports

@codecov

codecov Bot commented Aug 9, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f19481c) to head (a9d0de7).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #17   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        40        40           
===========================================
  Files              2         2           
  Lines             82        82           
===========================================
  Hits              82        82           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@valbeat valbeat merged commit 749301f into main Aug 9, 2025
5 of 6 checks passed
@valbeat valbeat deleted the feat/improve-test-coverage branch August 9, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants